﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using Medianamik.Core.Logging;

namespace Medianamik.Core.Redirect
{
    public class ExternalRedirectNode : SystemNode<ExternalRedirectNode>, IRedirectNode
    {
        public override Guid SystemNodeTypeID
        {
            get { return MedianamikTypes.MedianamikExternalRedirect; }
        }

        public override Guid NamePropertyId
        {
            get
            {
                return MedianamikProperties.MedianamikExternalRedirectFrom;
            }
        }

        public override Guid NodeTypeID
        {
            get
            {
                return SystemNodeTypeID;
            }
        }

        public string RedirectFrom
        {
            get
            {
                return DefaultInstance[MedianamikProperties.MedianamikExternalRedirectFrom].GetValue<string>();
            }
        }

        public string RedirectTo
        {
            get
            {
                return DefaultInstance[MedianamikProperties.MedianamikExternalRedirectTo].GetValue<string>();
            }
        }

        public int ResponseCode
        {
            get
            {
                return DefaultInstance[MedianamikProperties.MedianamikExternalRedirectCode].GetValue<int>();
            }
        }
    }
}
